/*
  Copyright (C) 2011, Kyungjoo Kim
  
  This file is part of UHM (Unassembled HyperMatrix) sparse direct solver.
  
  All rights reserved.

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.
  
  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.
  
  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  Also add information on how to contact you by electronic and paper mail.
  
  
  Kyungjoo Kim
  iamkyungjoo@gmail.com
*/
#ifndef UHM_UTIL_MESSAGE_HXX
#define UHM_UTIL_MESSAGE_HXX


/*!
  Error message
*/

// ** Common
#define UHM_ERROR_NOT_YET_IMPLEMENTED   ">> Not yet Implemented"



// ** Discrete
#define UHM_ERROR_CACHE_PUSH             ">> Entry already Exist"
#define UHM_ERROR_CACHE_PULL             ">> Entry does not Exist"
#define UHM_ERROR_MESH_NODE_SET_STATUS   ">> Node is an Orphan (a node shuld be owned by elements)"
#define UHM_ERROR_MESH_ELEMENT_SEPARATE  ">> Status of Nodes are Not Specified"
#define UHM_ERROR_MESH_ELEMENT_UPDATE    ">> Child Element is Not yet Separated"
#define UHM_ERROR_MESH_ADD_ELEMENT       ">> Given Element already Exist"

#define UHM_ERROR_TREE_CHILD_INDEX       ">> Child Index is Out of Range"
#define UHM_ERROR_TREE_NODE_INDEX        ">> Tree Node is Out of Range"
#define UHM_ERROR_TREE_ROOT_NULL         ">> Root is NULL"
#define UHM_ERROR_TREE_NOT_SORTED        ">> Tree is Not Sorted"

#define UHM_ERROR_DISCRETE_OP_FUNCT      ">> Fail to Process op_func"

// ** Matrices
#define UHM_ERROR_MAT_KIND               ">> Not Supported Mat_Kind_"
#define UHM_ERROR_MAT2LINAL              ">> Cannot Convert Variables to LINAL Parameters (FLAME)"

// ** Solvers
#define UHM_ERROR_SOLVER_NEW             ">> Fail to Allocate Solver Object (fail to do 'new')"

#define UHM_ERROR_SOLVER_OP_FUNCT        ">> Fail to Process op_func"
#define UHM_ERROR_DIRECT_FLOP            ">> Fail to Compute FLOP"
#define UHM_ERROR_DIRECT_DECOMPOSE       ">> Fail to Decompose Matrices"
#define UHM_ERROR_DIRECT_SOLVE_ZERO      ">> Fail to Solve 0"
#define UHM_ERROR_DIRECT_SOLVE_ONE       ">> Fail to Solve 1"
#define UHM_ERROR_DIRECT_SOLVE_TWO       ">> Fail to Solve 2" 

#define UHM_ERROR_SOLVER_PULLED_WORK     ">> Cannot Pull UHM from Work"
#define UHM_ERROR_SOLVER_GET_FLOP        ">> Tree is NOT either Constructed or Sorted"
#define UHM_ERROR_SOLVER_SET_GEN         ">> Fail to Generate Tree Info (tree is not compledted"
#define UHM_ERROR_SOLVER_SEPARATE_NODES  ">> Fail to Separate Nodes"
#define UHM_ERROR_SOLVER_SET_OFFSET      ">> Fail to Write Global Offset to Nodes"
#define UHM_ERROR_SOLVER_SET_MATRICES    ">> Fail to Set Matrices in Tree"
#define UHM_ERROR_SOLVER_CREATE_MATRICES ">> Fail to Create Matrices in Tree"

#define UHM_ERROR_SOLVER_MERGE           ">> Fail to Merge Children Matrices"
#define UHM_ERROR_SOLVER_COPY            ">> Fail to Copy Children Matrices"
#define UHM_ERROR_SOLVER_BRANCH          ">> Fail to Branch Children Matrices"

#define UHM_ERROR_PETSC_NOT_AVAIL        ">> PETSC is NOT Interfaced (use gcc -D __PETSC_USE__)"

#endif
